package com.lzq.model.prototype;

/**
 * @author : modify
 * @version : v1.0
 * @description :
 * @createTime : 2022/11/15 19:15
 * @updateUser : modify
 * @updateTime : 2022/11/15 19:15
 * @updateRemark :
 */
public class Citation implements Cloneable {
    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void show() {
        System.out.println("now name = " + name);
    }

    @Override
    public Citation clone() {
        try {
            return (Citation) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}

class CitationTest {
    public static void main(String[] args) {
        Citation citation = new Citation();
        Citation clone = citation.clone();
        citation.setName("张三");
        clone.setName("李四");

        citation.show();
        clone.show();
    }
}